package cn.tedu.spring.jdbc;

import com.alibaba.druid.pool.DruidDataSource;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.sql.SQLException;

/**
 * 测试类
 */
public class TestJdbc {
    /**
     * 演示 引入外部属性文件
     */
    @Test
    public void demoOne(){
        ApplicationContext context=new ClassPathXmlApplicationContext("bean-jdbc.xml");
        DruidDataSource source=context.getBean("source",DruidDataSource.class);
        System.out.println(source);
    }
}
